function object_properties(properties_type,data_type,field_type) {
	var this_setObject_eleDOM = $(this);
	if(typeof field_type == "undefined"){
		//catch
	}
    var ret = "";
    ret += '<div style="float:left;width:50%;">';
	ret += '<h3 class="pull-left">';
	    ret += '<i class="icon-asterisk fa fa-cogs"></i> ' + "Properties";
	ret += '</h3>';
    ret += '</div>';
    ret += '<div style="float:right;width:50%;text-align:right;margin-top:-5px;">';
	ret += '<input type="button" class="btn-basicBtn fl-margin-bottom" id="save_prop" value="Ok" onclick="setFieldProperties()">';
	ret += '<input type="button" class="btn-basicBtn fl-margin-bottom" id="popup_cancel" value="Cancel">';
    ret += '</div>';
    ret += '<div class="hr"></div>';
    ret += '<div id="content-dialog-scroll" style="position: relative; margin: 0px auto; padding: 0px; width: 100%; height: 317px;overflow: hidden;" class="ps-container">';
    ret +='<div class="content-dialog">';
 //    ret += '<div class="object_properties_content">';
	// ret += '<div class="scrollbarM object_properties_wrapper">';

	switch(properties_type){
		// case "picklist":
		// ret += obj_lblName("pull-left",data_type); 
		// ret += obj_lblInputName("pull-right",data_type); 
		// ret += obj_PlaceHolder("pull-left",data_type); 
		// ret += obj_Tooltip("pull-right",data_type); 
		// ret += obj_lblFontWeight("pull-left",data_type); 
		// ret += obj_lblFontSize("pull-right",data_type); 
		// ret += obj_fldMaxLength("pull-left",data_type);
		// ret += obj_fldHeight("pull-right",data_type);
		// ret += obj_fldWidth("pull-left",data_type);
		// ret += obj_fldType("pull-right",data_type);
		// ret += obj_lblAllow("pull-left",data_type);
		// ret += obj_lblAlignment("pull-right",data_type);
		// ret += obj_lblFontColor("pull-left",data_type); 
		// ret += obj_fldColor("pull-right",data_type);
		// ret += obj_chkETrig("pull-left",data_type);
		// ret += obj_tabIndex("pull-right",data_type);
		
		
		// ret += obj_inputValidation("pull-left",data_type);
		// ret += obj_chkVisibility("pull-right",data_type);
		// ret += obj_inputValidationMessage("pull-left",data_type);
		// ret += obj_defaultValue("pull-right",data_type)
		// ret += picklistSelectionType("pull-left",data_type);
		// break;
	    case "1":
	    ret += '<div class="fl-floatLeft fl-form-prop-cont-wid">';
		    ret += obj_lblName("",data_type); 
			ret += obj_PlaceHolder("", data_type); 
			ret += obj_lblFontWeight("", data_type); 
			ret += fieldFontSize("", data_type);
			ret += obj_fldHeight("", data_type);
			ret += obj_fldType("", data_type);
			ret += obj_fldColor("", data_type);
			ret += obj_lblAlignment("", data_type);
			ret += obj_tabIndex("", data_type);
			ret += obj_inputValidation("", data_type);
			ret += obj_inputValidationMessage("", data_type);
			ret += obj_fldBGColor("", data_type);
			ret += obj_defaultValue("", data_type);
		ret += '</div>';

		ret += '<div class="fl-floatRight fl-form-prop-cont-wid">';
			ret += obj_lblInputName("", data_type); 
			ret += obj_Tooltip("", data_type); 
			ret += obj_lblFontSize("", data_type);
			ret += obj_fldMaxLength("", data_type);
			ret += obj_fldWidth("", data_type);
			ret += obj_lblAllow("", data_type);
			ret += obj_lblFontColor("", data_type); 
			ret += obj_chkETrig("", data_type);
			ret += obj_propEcrypt("", data_type);
			ret += obj_chkVisibility("", data_type);
			ret += obj_borderVisibility("", data_type);
			ret += obj_setReadonlyField("",data_type);
			//ret += obj_allowDuplicate("", "pull-right",data_type);
			if(field_type == "pickList"){
				ret += picklistSelectionType("", data_type);
				//ret += picklist_image("", data_type);
				//picklist_image(obj_float,data_type)
				// ret += obj_picklistButton("", data_type);
			}
			ret += obj_middleWareChoice("", data_type);
		ret += '</div>';

		
		break;
	    case "2":
	    ret += '<div class="fl-floatLeft fl-form-prop-cont-wid">';
	    	ret += obj_lblName("", data_type);
			ret += obj_Tooltip("", data_type);
			ret += obj_lblFontWeight("", data_type); 
			ret += obj_lblFontSize("", data_type);
			if(field_type != "radioButton" && field_type != "checkbox"){
				ret += obj_fldHeight("", data_type);
			}
			
			ret += obj_lblAllow("", data_type);
			ret += obj_alignRCField("", data_type);
			ret += obj_tabIndex("", data_type);
			ret += obj_setReadonlyField("",data_type);
			ret += obj_defaultValueChoices("", data_type);
	    ret += '</div>';

	    ret += '<div class="fl-floatRight fl-form-prop-cont-wid">';
	    	ret += obj_lblInputName("", data_type);	
			ret += obj_addChoices("", data_type);
			ret += fieldFontSize("", data_type);
			if(field_type != "radioButton" && field_type != "checkbox"){
				ret += obj_fldWidth("", data_type);
			}
			
			ret += obj_lblAlignment("", data_type);			
			//ret += obj_allowDuplicate("pull-right",data_type);
			ret += obj_lblFontColor("", data_type);
			ret += obj_propEcrypt("", data_type);
			ret += obj_chkETrig("", data_type);
			ret += obj_chkVisibility("", data_type);
			if(field_type == "radioButton" || field_type == "checkbox"){
				// ret += picklistSelectionType("pull-right",data_type);
				ret += radioAndCheckboxLabelProp("", data_type,field_type);
				ret += obj_radioCheckboxSpacing("", data_type,field_type);
			}
	    ret += '</div>';
		break;
	    case "3":
	    ret += '<div class="fl-floatLeft fl-form-prop-cont-wid">';
	    	ret += obj_lblName("", data_type);
			ret += obj_lblFontColor("", data_type);
	    ret += '</div>';

	    ret += '<div class="fl-floatRight fl-form-prop-cont-wid">';
	    	// ret += obj_fldHeight("pull-right",data_type);
			// ret += obj_fldWidth("pull-left",data_type);
			ret += obj_lblAllow("", data_type);
			ret += obj_fldColor("", data_type);
	    ret += '</div>';
		break;
	    case "4":
		ret += obj_lblInputName("",data_type); 
		break;
		case "formtable":

		ret += '<div class="fl-floatLeft fl-form-prop-cont-wid">';
			ret += obj_lblName("", data_type);
			ret += obj_lblFontWeight("", data_type); 
			ret += obj_lblFontColor("", data_type);
			ret += obj_repeaterTable("", data_type);
		ret += '</div>';

		ret += '<div class="fl-floatRight fl-form-prop-cont-wid">';
			ret += obj_TableName("", data_type);
			ret += obj_lblFontSize("", data_type);
			ret += obj_lblAllow("", data_type);
			ret += obj_tableBorderVisibility("", data_type);
			// ret += obj_tableRelationalAction("", data_type);
			//ret += obj_cellColor("pull-left",data_type);
		ret += '</div>';
		break; 
		case "tabpanel":

		ret += '<div class="fl-floatLeft fl-form-prop-cont-wid">';
			ret += obj_lblInputName("", data_type);
			ret += obj_lblFontWeight("", data_type); 
			ret += obj_lblFontColor("", data_type);
		ret += '</div>';

		ret += '<div class="fl-floatRight fl-form-prop-cont-wid">';
			ret += obj_lblName("", data_type);
			ret += obj_lblFontSize("", data_type);
			ret += obj_lblAllow("", data_type);
		ret += '</div>';
		
		// ret += obj_propTabName("pull-right",data_type);
		// ret += obj_chkETrig("pull-right",data_type);
		// ret += obj_lblInputName("pull-right",data_type);
		break;
		case "label":
			if(field_type == "imageForm"){

			}else{
				ret += '<div class="fl-floatLeft fl-form-prop-cont-wid">';
					ret += obj_lblFontSize("", data_type);
					ret += obj_lblName("", data_type);
				ret += '</div>';

				ret += '<div class="fl-floatRight fl-form-prop-cont-wid">';
					ret += obj_lblFontWeight("", data_type);
					ret += obj_lblFontColor("", data_type);
				ret += '</div>';
			}
		break;
	    case "photos":
		// ret += obj_lblName("pull-left",data_type);
		//ret += '<div class="fl-floatLeft fl-form-prop-cont-wid">';
		ret += obj_lblInputName("", data_type); 
		//ret += '</div>';
		// ret += obj_lblFontWeight("pull-right",data_type);
		// ret += obj_lblFontSize("pull-left",data_type);
		// ret += obj_lblFontColor("pull-right",data_type);
		break;
		case "computed":

			ret += '<div class="fl-floatLeft fl-form-prop-cont-wid">';
				ret += obj_lblName("", data_type); 
				ret += obj_PlaceHolder("", data_type); 
				ret += obj_lblFontWeight("", data_type); 
				ret += fieldFontSize("", data_type); 
				ret += obj_fldHeight("", data_type);
				ret += obj_fldType("", data_type);
				ret += obj_lblAlignment("", data_type);
				ret += obj_fldColor("", data_type);
				ret += processor_fb("", data_type);
			ret += '</div>';

			ret += '<div class="fl-floatRight fl-form-prop-cont-wid">';
				ret += obj_lblInputName("", data_type); 			
				ret += obj_Tooltip("", data_type); 				
				ret += obj_lblFontSize("", data_type);
				ret += obj_fldMaxLength("", data_type);
				ret += obj_fldWidth("", data_type);
				ret += obj_lblAllow("", data_type);
				ret += obj_lblFontColor("", data_type);
				ret += processorType_fb("", data_type);
				ret += obj_tabIndex("", data_type);
				ret += obj_setReadonlyField("",data_type);
			ret += '</div>';
		break;
		case "embedview":
		//value="static"

			ret += '<div class="fl-floatLeft fl-form-prop-cont-wid">';
				ret += obj_lblFontSize("", data_type);
				ret += obj_lblFontWeight("", data_type);
				ret += obj_lblAllow("", data_type);
				ret += highlightedRowProp("", data_type);
			ret += '</div>';

			ret += '<div class="fl-floatRight fl-form-prop-cont-wid">';
				ret += obj_lblName("", data_type);
				ret += obj_lblFontColor("", data_type);
				ret += obj_embedProperty("", data_type);
				ret += embedDisplayColumn("", data_type);
				ret += obj_setReadonlyField("",data_type);
			ret += '</div>';
		break;
		case "barcode_property":
			ret += '<div class="fl-floatLeft fl-form-prop-cont-wid">';
				ret += obj_lblName("", data_type); 
				ret += obj_PlaceHolder("", data_type); 
				ret += obj_lblFontWeight("", data_type); 
				ret += obj_fldMaxLength("", data_type);
				ret += obj_fldWidth("", data_type);
				ret += obj_lblAllow("", data_type);
				ret += obj_lblFontColor("", data_type); 
				ret += obj_chkETrig("", data_type);
				ret += obj_inputValidation("", data_type);
				ret += obj_inputValidationMessage("", data_type);
			ret += '</div>';

			ret += '<div class="fl-floatRight fl-form-prop-cont-wid">';
				ret += obj_lblInputName("", data_type); 
				ret += obj_Tooltip("", data_type); 
				ret += obj_lblFontSize("", data_type); 
				ret += obj_fldHeight("", data_type);
				ret += obj_fldType("", data_type);
				ret += obj_lblAlignment("", data_type);
				ret += obj_fldColor("", data_type);
				ret += obj_tabIndex("", data_type);
				ret += obj_chkVisibility("", data_type);
				ret += obj_defaultValue("", data_type)
			ret += '</div>';

			
		break;
		case "notes-style-property":

			ret += '<div class="fl-floatLeft fl-form-prop-cont-wid">';
				ret += obj_lblName("", data_type); 
				ret += obj_PlaceHolder("", data_type); 
				ret += obj_lblFontWeight("", data_type); 
				ret += fieldFontSize("", data_type);
				ret += obj_fldMinHeight("", data_type);//BAGO
				ret += obj_fldMaxHeight("", data_type);//BAGO
				//ret += obj_fldType("", data_type);
				ret += obj_fldColor("", data_type);
				ret += obj_lblAlignment("", data_type);
				ret += obj_tabIndex("", data_type);
				ret += obj_inputValidation("", data_type);
				ret += obj_inputValidationMessage("", data_type);
				ret += obj_middleWareChoice("", data_type);
				if(this_setObject_eleDOM.parent().hasClass("td-relative")){
					ret += obj_noteStyleFluidContainerCell("", data_type);
				}
			ret += '</div>';

			ret += '<div class="fl-floatRight fl-form-prop-cont-wid">';
				ret += obj_lblInputName("", data_type);
				ret += obj_Tooltip("", data_type);
				ret += obj_lblFontSize("", data_type);
				ret += obj_fldMaxLength("", data_type);
				// ret += obj_fldHeight("pull-left",data_type);
				// ret += obj_fldWidth("pull-right",data_type);
				ret += obj_fldMinWidth("", data_type);//BAGO
				ret += obj_fldMaxWidth("", data_type);//BAGO
				ret += obj_lblAllow("", data_type);
				ret += obj_fldBGColor("",data_type);
				ret += obj_lblFontColor("", data_type);
				ret += obj_chkETrig("", data_type);
				ret += obj_propEcrypt("", data_type);
				ret += obj_chkVisibility("", data_type);
				//ret += obj_defaultValue("", data_type);
			ret += '</div>';
			
			

		break;
	}

	ret += '</div>';
    ret += '</div>';
	
    return ret;
    
}

// Hide / Show Properties of objects
function prop_hovering() {
    $("body").on("mouseenter",".workspace.formbuilder_ws .setObject",function(){
		var object_id = $(this).attr("data-object-id");
		$("#obj_actions_"+object_id).removeClass("display")
		$("#setObject_"+object_id).css("border-color","#ddd");
	    $("#setObject_" + object_id).addClass("hovering_object");
    });
    $("body").on("mouseleave",".setObject",function(){
	var object_id = $(this).attr("data-object-id");
	$("#obj_actions_"+object_id).addClass("display")
	$("#setObject_"+object_id).css("border-color","transparent");
	    $(".hovering_object").removeClass("hovering_object");
    });
}

/***************************** Object Properties ***********************************/

    /*
    *
    *
    */
    function obj_picklistButton(obj_float,data_type){
    	var ret
    	=	'<div class="' + obj_float + ' properties_width_container picklistButton">'+
			    '<div class="fields_below">'+
					'<div class="input_position_below picklistButton_prop_cont">'+
				    	'<div class="label_below2">Options Spacing: <font color="red"></font></div>'+
						'<div class="input_position_below " data-type="'+data_type+'">'+
							'<select name="picklistButton_prop" data-type="' + data_type + '" class="form-text obj_prop picklistButton_prop_field" data-properties-type="picklistButton_prop" placeholder="Picklist Button Property">'+
								'<option value="0">--Select--</option>'+
							'</select>'+
							'<div class="">'+
								'<input type="text"/>'+
							'</div>'+
						'</div>'+
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
    }
    function obj_radioCheckboxSpacing(obj_float,data_type){
    	var ret
    	=	'<div class="' + obj_float + ' properties_width_container radioCheckboxSpacing">'+
			    '<div class="fields_below">'+
					'<div class="input_position_below radioCheckboxSpacing_prop">'+
				    	'<div class="label_below2">Options Spacing: <font color="red"></font></div>'+
						'<div class="input_position_below rc-field-spacing" data-type="'+data_type+'">'+
							'<input type="text" name="option-spacing" data-type="' + data_type + '" class="form-text obj_prop" data-properties-type="optionSpacing" placeholder="Options Spacing">'+
						'</div>'+
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
    }
    function obj_tableRelationalAction(obj_float,data_type){
    	var ret
    	=	'<div class="' + obj_float + ' properties_width_container tableRelationalAction">'+
			    '<div class="fields_below">'+
					'<div class="input_position_below tableRelationalAction_prop">'+
				    	'<div class="label_below2">Add Remove Row Response To TBL: <font color="red"></font></div>'+
						'<div class="input_position_below select_names_here" data-type="'+data_type+'">'+
							//'<label><input type="checkbox" name="prop-select-tbl-names" value="'+"name"+'" /><span class="name-text">'+'NAME'+'</span></label>'+
						'</div>'+
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
    }
    function obj_noteStyleFluidContainerCell(obj_float,data_type){
		var ret
    	=	'<div class="' + obj_float + ' properties_width_container noteStyleFluidContainerCell">'+
			    '<div class="fields_below">'+
					'<div class="input_position_below noteStyleFluidContainerCell_prop">'+
				    	'<div class="label_below2">Set Cell Container as Fluid: <font color="red"></font></div>'+
						'<div class="input_position_below">'+
							'<select data-type="' + data_type + '" name="" class="form-select obj_prop" id="" data-properties-type="noteStyleFluidContainerCell" data-object-id="">'+
								'<option value="Yes">Yes</option>'+
								'<option value="No">No</option>'+
						    '</select>'+
						'</div>'+
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
    }
    function obj_setReadonlyField(obj_float,data_type){
		var ret
    	=	'<div class="' + obj_float + ' properties_width_container setReadOnlyField">'+
			    '<div class="fields_below">'+
					'<div class="input_position_below setReadOnlyField_prop">'+
				    	'<div class="label_below2">Set as Readonly: <font color="red"></font></div>'+
						'<div class="input_position_below">'+
							'<select data-type="' + data_type + '" name="" class="form-select obj_prop" id="" data-properties-type="setReadOnlyField" data-object-id="">'+
								'<option value="No">No</option>'+
								'<option value="Yes">Yes</option>'+
						    '</select>'+
						'</div>'+
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
    }
    function obj_fldBGColor(obj_float,data_type) {
		var ret
		=	'<div class="' + obj_float + ' properties_width_container propFieldBGcolor">'+
				'<div class="fields_below">'+
					'<div class="label_below2">Field BGColor:</div>'+
					'<div class="input_position_below">'+
						'<input type="text" data-type="' + data_type + '" class="chngColor" data-properties-type="lblFieldBGColor" data-type="button"/>'+
					'</div>'+
				'</div>'+
			'</div>';
	    return ret;
    }

    function obj_borderVisibility(obj_float,data_type){
    	var ret
    	=	'<div class="' + obj_float + ' properties_width_container borderVisibility">'+
			    '<div class="fields_below">'+
					'<div class="input_position_below borderVisibility_prop">'+
				    	'<div class="label_below2">Border Visibility: <font color="red"></font></div>'+
						'<div class="input_position_below">'+
							'<select data-type="' + data_type + '" name="" class="form-select obj_prop" id="" data-properties-type="borderVisibility" data-object-id="">'+
								'<option value="Yes">Yes</option>'+
								'<option value="No">No</option>'+
						    '</select>'+
						'</div>'+
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
    }

    

    function obj_propEcrypt(obj_float,data_type){
    	var ret
    	=	'<div class="' + obj_float + ' properties_width_container encryptDataProperty">'+
			    '<div class="fields_below">'+
					'<div class="input_position_below encrypt_data_prop">'+
				    	'<div class="label_below2">Data Encryption: <font color="red"></font></div>'+
						'<div class="input_position_below">'+
							'<select data-type="' + data_type + '" name="" class="form-select obj_prop" id="" data-properties-type="ecryptDataPropField" data-object-id="">'+
								'<option value="No">No</option>'+
								'<option value="Yes">Yes</option>'+
						    '</select>'+
						'</div>'+
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
    }
    function obj_tableBorderVisibility(obj_float,data_type){
    	var ret
    	=	'<div class="' + obj_float + ' properties_width_container tableBorderProperty">'+
			    '<div class="fields_below">'+
					'<div class="input_position_below form_table_border_visibility">'+
				    	'<div class="label_below2">Border visible: <font color="red"></font></div>'+
						'<div class="input_position_below">'+
							'<select data-type="' + data_type + '" name="" class="form-select obj_prop" id="" data-properties-type="tableBorderVisible" data-object-id="">'+
								'<option value="Yes">Yes</option>'+
								'<option value="No">No</option>'+
						    '</select>'+
						'</div>'+
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
    }
    
    //FIELD FONT SIZE
    function fieldFontSize(obj_float,data_type){
    	var ret
		= '<div class="' + obj_float + ' properties_width_container">'+
			'<div class="fields_below">'+
				'<div class="label_below2">Field Font Size:</div>'+
				'<div class="input_position_below">'+
					'<select data-type="' + data_type + '" class="form-select obj_prop" data-object-id="" id="" data-properties-type="fieldFontSize">'+
					    '<option>------Select------</option>'+
					    '<option value="6px">6px</option>'+
					    '<option value="8px">8px</option>'+
					    '<option value="9px">9px</option>'+
					    '<option value="10px">10px</option>'+
					    '<option value="11px">11px</option>'+
					    '<option value="12px">12px</option>'+
					    '<option value="14px">14px</option>'+
					    '<option value="18px">18px</option>'+
					    '<option value="24px">24px</option>'+
					    '<option value="30px">30px</option>'+
					    '<option value="36px">36px</option>'+
					    '<option value="48px">48px</option>'+
					    '<option value="60px">60px</option>'+
					    '<option value="72px">72px</option>'+
				    '</select>'+
				'</div>'+
			'</div>'+
		'</div>';
	    return ret;
    }
    //EMBED CHOOSE DISPLAY COLUMN
    function embedDisplayColumn(obj_float,data_type) {
		var ret
		= '<div class="' + obj_float + ' properties_width_container">'+
			'<div class="fields_below">'+
				'<div class="label_below2">Select column to display:</div>'+
				'<div class="input_position_below">'+
					'<select multiple data-type="' + data_type + '" name="" class="form-select embed-display-column" id="" data-properties-type="lblAllowLabel" data-object-id="">'+
						//magkakalaman
					'</select>'+
				'</div>'+
			'</div>'+
		'</div>';
		    return ret;
    }

    //EMBED HIGHLIGHTED ROW
    function highlightedRowProp(obj_float,data_type){
    	var ret =
			'<div class="' + obj_float + ' properties_width_container">'+
			    '<div class="fields_below">'+
				'<div class="label_below2">'+
					'<label>Highlight: <input value="true" style="vertical-align: middle;" type="checkbox" name="allow_highlights" class="css-checkbox" id="allow_highlights"/><label for="allow_highlights" class="css-label"></label> </label>'+
					'&nbsp;<label>cell: <input value="cell" style="vertical-align: middle;" type="radio" name="highlight_type" class="css-checkbox" id="highlight_type_cell"/><label for="highlight_type_cell" class="css-label"></label> </label>'+
					'&nbsp;<label>row: <input checked="checked" value="row" style="vertical-align: middle;" type="radio" name="highlight_type" class="css-checkbox" id="highlight_type_row"/><label for="highlight_type_row" class="css-label"></label> </label><font color="red"></font>'+
				'</div>'+
				'<div class="input_position_below">'+
				    '<div class="highlight-row-prop" data-type="' + data_type + '" style="position:relative;height:200px;overflow:auto; padding:10px;">'+
				    	'<table class="design-embed-highlights-prop" border="1" style="width:100%;">'+
				    		'<tbody>'+
				    			'<tr class="HL_RULE_PROP1">'+
					    			'<td style="width:55px;">'+
					    				'<div class="relative-wrap" style="position: relative;width: 100%;height: 100%;">'+
						    				'<label style="text-align:center;display:inline-block;width:100%; margin:7px 0px;">Color:</label><br/>'+
						    				'<input type="text" class="chooseColor hl-color" data-properties-type="embRowColor" data-type="emb-highlight-color"/>'+
					    				'</div>'+
					    			'</td>'+
					    			'<td>'+
					    				'<div class="relative-wrap" style="position: relative;width: 100%;height: 100%;">'+
						    				'<label style="text-align:center;display:inline-block;width:100%; margin:7px 0px;">Fieldname:</label><br/>'+
						    				'<select class="form-select hl-fn fieldname-basis-highlight">'+
						    					'<option>--Select--</option>'+
						    					'<option>2</option>'+
						    					'<option>3</option>'+
						    				'</select>'+
						    			'</div>'+
					    			'</td>'+
					    		'</tr>'+
					    		'<tr class="HL_RULE_PROP2">'+
					    			'<td colspan="2" style="width:55px;text-align:center;">'+
					    				'<div class="relative-wrap" style="position: relative;width: 100%;height: 100%;">'+
						    				'<label style="display:inline-block;width:50%; margin-top:7px;">Condition Type:</label>'+
						    				'<label style="display:inline-block;width:50%; margin-top:7px;">Value:</label><br/>'+
						    				'<select type="text" class="form-select choose-condition-type" style="margin: 0px 4px 0px 0px; display:inline-block;width:49%;">'+
						    					'<option value="equals">Equals</option>'+
						    					'<option value="greater_than_equals">Greater Than Equals</option>'+
						    					'<option value="greater_than">Greater Than</option>'+
						    					'<option value="less_than_equals">Less Than Equals</option>'+
						    					'<option value="less_than">Less Than</option>'+
						    					'<option value="range">Range</option>'+
						    					'<option value="in_between">In Between</option>'+
						    				'</select>'+
						    				'<div class="form-text value-container" style="display:inline-block;width:49%;">'+
						    					'<label style="margin-bottom:7px; display: inline-block;">static: <input type="radio" checked="checked" value="static" class="value-type-HL css-checkbox" data-name="val-type" name="val-type_r0" id="HLradioStatic"/><label for="HLradioStatic" class="css-label"></label></label><label style="display: inline-block;margin-bottom:7px;">computed: <input type="radio" value="computed" class="value-type-HL css-checkbox" data-name="val-type" name="val-type_r0" id="HLradioComputed"/><label for="HLradioComputed" class="css-label"></label></label>'+
						    					'<input class="form-text hl-value" style="min-width:20px;margin:0;display:inline-block;"/>'+
						    					'<input class="form-text hl-value2" style="min-width:20px;width:49%;margin:0;display:none;"/>'+
						    				'</div>'+
						    				'<div style="clear:both;"></div>'+
					    				'</div>'+
					    			'</td>'+
					    		'</tr>'+
				    		'</tbody>'+
				    	'</table>'+
				    '</div>'+
				'</div>'+
			    '</div>'+
			'</div>';
	    return ret;
    }

   //EMBED HIGHLIGHTED ROW VERSION 2
   //  function highlightedRowPropV2(obj_float,data_type){
   //  	var ret =
			// '<div class="' + obj_float + ' properties_width_container">'+
			//     '<div class="fields_below">'+
			// 	'<div class="label_below2">'+
			// 		'<label>Highlight: <input value="true" style="vertical-align: middle;" type="checkbox" name="allow_highlights"/></label>'+
			// 		'<label>cell: <input value="cell" style="vertical-align: middle;" type="radio" name="highlight_type"/></label>'+
			// 		'<label>row: <input checked="checked" value="row" style="vertical-align: middle;" type="radio" name="highlight_type"/></label><font color="red"></font>'+
			// 	'</div>'+
			// 	'<div class="input_position_below">'+
			// 	    '<div class="highlight-row-prop" data-type="' + data_type + '" style="position:relative;height:200px;overflow:auto;">'+
			// 	    	'<table class="design-embed-highlights-prop" border="1" style="width:100%;">'+
			// 	    		'<tbody>'+
			// 	    			'<tr class="HL_RULEV2_PROP">'+
			// 		    			'<td style="width:55px;height: 110px;">'+
			// 		    				'<div class="relative-wrap" style="position: relative;width: 100%;height: 100%;">'+
			// 			    				'<label style="text-align:center;display:inline-block;width:100%;">Color:</label><br/>'+
			// 			    				'<input type="text" class="chooseColor hl-color" data-properties-type="embRowColor" data-type="emb-highlight-color"/>'+
			// 		    				'</div>'+
			// 		    			'</td>'+
			// 		    			'<td>'+
			// 		    				'<div class="relative-wrap" style="position: relative;width: 100%;height: 100%;">'+
			// 			    				'<label style="text-align:center;display:inline-block;width:100%;">Formula:</label><br/>'+
			// 			    				'<textarea class="HL-formula" style="width: 99%; height: 80px; margin: 0px; resize: vertical;"></textarea>'+
			// 			    			'</div>'+
			// 		    			'</td>'+
			// 		    		'</tr>'+
			// 	    		'</tbody>'+
			// 	    	'</table>'+
			// 	    '</div>'+
			// 	'</div>'+
			//     '</div>'+
			// '</div>';
	  //   return ret;
   //  }
    function obj_TableName(obj_float,data_type) {
		var ret =
			'<div class="' + obj_float + ' properties_width_container">'+
			    '<div class="fields_below">'+
				'<div class="label_below2">Table Name: <font color="red"></font></div>'+
				'<div class="input_position_below">'+
				    '<input type="text" name="set-prop-table-name" data-type="' + data_type + '" class="form-text obj_prop" data-properties-type="TableName" placeholder="Table Name">'+
				'</div>'+
			    '</div>'+
			'</div>';
	    return ret;
    }
    function radioAndCheckboxLabelProp(obj_float,data_type,field_type){
    	var caption = "";
    	if(field_type == "radio"){
    		caption = "Allow label in radio button:";
    	}else{
    		caption = "Allow label in checkbox:";
    	}
    	var ret
    	= '<div class="' + obj_float + ' properties_width_container">'+
    		'<div class="fields_below">'+
			'<div class="label_below2">'+caption+'</div>'+
			'<div class="input_position_below">'+
			    '<select data-type="' + data_type + '" name="" class="form-select obj_prop" id="" data-properties-type="lblAllowLabel-RC" data-object-id="">'+
					'<option value="Yes">Yes</option>'+
					'<option value="No">No</option>'+
			    '</select>'+
			'</div>'+
		    '</div>'+
		'</div>';
	    return ret;
    }

    function skipSpace(obj_float,data_type){
    	var ret = ""+
			'<div class="' + obj_float + ' properties_width_container">'+
				'<div class="fields_below">'+
					'<div class="label_below2"><font color="red"></font></div>'+
					'<div class="input_position_below">'+
						'<div></div>'+
					'</div>'+
				'</div>'+
			'</div>';
	    return ret;
    }
    function picklistSelectionType(obj_float,data_type){
    	var ret = ""+
			'<div class="' + obj_float + ' properties_width_container picklistSelectionType">'+
				'<div class="fields_below">'+
					'<div class="label_below2">Picklist Selection Type: <font color="red"></font></div>'+
					'<div class="input_position_below">'+
						'<label><input type="radio" checked="true" value="Single" name="selection_type" data-type="' + data_type + '" class=" css-checkbox" data-properties-type="" data-object-id="" id="picklistSingle" /><label for="picklistSingle" class="css-label"></label> Single</label>'+
						'<label> <input type="radio" value="Multiple" name="selection_type" data-type="' + data_type + '" class="css-checkbox" data-properties-type="" data-object-id="" id="picklistMultiple" /><label for="picklistMultiple" class="css-label"></label> Multiple</label>'+
					'</div>'+
				'</div>'+
			'</div>';
	    return ret;
    }
    
    function picklist_image(obj_float,data_type){
    	var ret = ""+
			'<div class="' + obj_float + ' properties_width_container picklis_img_button">'+
				'<div class="fields_below">'+
					'<div class="label_below2">Choose what you want to for the icon clickable in picklist: <font color="red"></font></div>'+
					'<div class="input_position_below">'+
						'<label><input type="radio" checked="true" value="Default" name="selection_type_img" data-type="' + data_type + '" class="choose_set_picklist" data-properties-type="" data-object-id="">Default</label> '+
						'<label><input type="radio" value="Image" name="selection_type_img" data-type="' + data_type + '" class="choose_set_picklist" data-properties-type="" data-object-id="">Image</label> '+
						'<label><input type="radio" value="Word" name="selection_type_img" data-type="' + data_type + '" class="choose_set_picklist" data-properties-type="" data-object-id="">Word</label> '+
						
						'<div class="set_b_i set_Default" style="margin-top:10px;">'+
						'<i class="icon-list-alt fa fa-list-alt"></i> '+
						'</div>'+
						'<div class="set_b_i set_Word display" style="margin-top:10px;">'+
						'<input type="text" data-type="' + data_type + '" class=" form-text word_btn" id="word_btn" data-properties-type="' + data_type + '" data-object-id="" placeholder="Set your word."> '+
						'</div>'+
						'<div class="set_b_i set_Image display" style="margin-top:10px;">'+
						'<form id="postFile" method="post" enctype="multipart/form-data" action="/ajax/uploadFile" style="margin-top: 10px;">'+
							'<div class="postActions">'+
								'<img data-placement="bottom"  data-type="' + data_type + '" data-original-title="" src="/images/error/broken.png" width="44" height="44" class="avatar userAvatar imagePrev" style="float: left;margin-right: 10px;">'+
							   //'<input type="submit" class="btn-blueBtn fl-btn-right ceatepost " data-get-file="imagePost" data-location="postUpload" data-file="imagePreviewUpload" value="POST" style="">'+
							   '<div id="uniform-fileInput" class="uploader">'+
							      '<input type="file" data-action-id="2" value="upload" name="postFile" id="uploadForm" size="24" data-action-id="2" data-action-type="upload_form_icon_image" style="opacity: 0;" class="upfile">'+
							      '<span id="uploadFilename_2" class="filename">No file selected</span>'+
							      '<span class="action">Choose File</span>'+
							      '<input type="hidden" value="post_forms_object" name="uploadType">'+
							      '<input type="hidden" value="forms_object" name="uploadFolder">'+
							   '</div>'+
							      '<div class="spinner  display postFileLoad">'+
								 '<div class="bar1"></div>'+
								 '<div class="bar2"></div>'+
								 '<div class="bar3"></div>'+
								 '<div class="bar4"></div>'+
								 '<div class="bar5"></div>'+
								 '<div class="bar6"></div>'+
								'<div class="bar7"></div>'+
								'<div class="bar8"></div>'+
								'<div class="bar9"></div>'+
								'<div class="bar10"></div>'+
							      '</div>'+
							    '<!--<img src="/images/loader/loader.gif" class="postFileLoad pull-left " style="margin-left: 5px;margin-top:6px;"/> -->'+
							'</div>'+
						     '</form>'+
						'</div>'+
					'</div>'+
				'</div>'+
			'</div>';
	    return ret;
    }
  //   function obj_propTabName(obj_float,data_type) {
		// var ret = ""+
		// 	'<div class="' + obj_float + ' properties_width_container">'+
		// 		'<div class="fields_below">'+
		// 			'<div class="label_below2">Tab Name: <font color="red"></font></div>'+
		// 			'<div class="input_position_below">'+
		// 				'<input type="radio" name="pick_slelection_type" data-type="' + data_type + '" class="form-text obj_prop" data-properties-type="" data-object-id="">'+
		// 				'<input type="radio" name="pick_slelection_type" data-type="' + data_type + '" class="form-text obj_prop" data-properties-type="" data-object-id="">'+
		// 			'</div>'+
		// 		'</div>'+
		// 	'</div>';
	 //    return ret;
  //   }

    function obj_propTabPanelName(obj_float,data_type) {
		var ret = ""+
			'<div class="' + obj_float + ' properties_width_container">'+
				'<div class="fields_below">'+
					'<div class="label_below2">Tab Panel Name: <font color="red"></font></div>'+
					'<div class="input_position_below">'+
						'<input type="text" name="" data-type="' + data_type + '" class="form-text obj_prop" id="prop-tabPanelName" data-properties-type="tabPanelName" data-object-id="" placeholder="Tab Name">'+
					'</div>'+
				'</div>'+
			'</div>';
	    return ret;
    }

    function obj_chkVisibility(obj_float,data_type){
		var ret
    	=	'<div class="' + obj_float + ' properties_width_container chk_Visibility">'+
			    '<div class="fields_below">'+
					'<div class="label_below2">'+"Visibility: "+'  <font color="red"></font></div>'+
					'<div class="input_position_below chk_Visibility_below">'+
				    	'<label><input type="radio" value="yes" class="visibility-choices css-checkbox" name="visibility-choices" id="visibility-choices" /><label for="visibility-choices" class="css-label"></label> Yes </label>'+
				    	'<label><input type="radio" value="no" class="visibility-choices css-checkbox" name="visibility-choices" id="visibility-choices2" /><label for="visibility-choices2" class="css-label"></label> No </label>'+
				    	'<label><input type="radio" value="computed" class="visibility-choices css-checkbox" name="visibility-choices" id="visibility-choices3" /><label for="visibility-choices3" class="css-label"></label> Computed </label>'+
				    	'<textarea class="form-textarea visibility-formula"></textarea>'+
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
    }
    function obj_chkETrig(obj_float,data_type){
		var ret
    	=	'<div class="' + obj_float + ' properties_width_container chk_ETrig" style="height: 60px;">'+
			    '<div class="fields_below">'+
					'<div class="label_below2">'+" Refresh trigger"+'  <font color="red"></font></div>'+
					'<div class="input_position_below chk_ETrig_below">'+
				    	'<input type="checkbox" value="yes" class="css-checkbox" id="refreshtrigger" /><label for="refreshtrigger" class="css-label"></label> Refresh Fields On Change'+
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
    }
    function obj_alignRCField(obj_float,data_type){
    	var labelRC_type = "";
    	if(data_type == "radioButton"){
    		labelRC_type = "Radio";
    	}else if(data_type == "checkbox"){
    		labelRC_type = "Checkbox";
    	}
    	if(labelRC_type.length){
    		var ret
	    	=	'<div class="' + obj_float + ' properties_width_container rcAlignmentProperty">'+
				    '<div class="fields_below">'+
						'<div class="label_below2">'+labelRC_type+' alignment type: <font color="red"></font></div>'+
						'<div class="input_position_below rc_alignment">'+
					    	'<select class="form-select rc-alignment">'+
					    		'<option value="vertical">Vertical</option>'+
					    		'<option value="horizontal">Horizontal</option>'+
					    	'</select>'+
						'</div>'+
				    '</div>'+
				'</div>';
			return ret;
    	}else{
    		return "";
    	}
    }
    function obj_repeaterTable(obj_float,data_type){
    	var ret
    	=	'<div class="' + obj_float + ' properties_width_container repeaterTableOption">'+
			    '<div class="fields_below">'+
					'<div class="label_below2">Table Type: <font color="red"></font></div>'+
					'<div class="input_position_below form_table_type">'+
				    	'<select class="form-select form-table-type">'+
				    		'<option value="normal">Default</option>'+
				    		'<option value="dynamic">Dynamic Row</option>'+
				    	'</select>'+
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
    }
    function obj_embedProperty(obj_float1,obj_float2,obj_float3,data_type){
    	var ret
    	=	'<div class="' + obj_float1 + ' properties_width_container embedProperty">'+
			    '<div class="fields_below">'+
					'<div class="label_below2">Select Embed Source Form: <font color="red"></font></div>'+
					'<div class="input_position_below embed_source_form">'+
				    	'<select class="form-select embed-source-form" data-type="'+data_type+'" ></select>'+
					'</div>'+
			    '</div>'+ 
			'</div>';
		ret
		+=	'<div class="' + obj_float2 + ' properties_width_container embedProperty">'+
			    '<div class="fields_below">'+
					'<div class="label_below2">Source lookup field: <font color="red"></font></div>'+
					'<div class="input_position_below embed_source_lookup_field">'+
						'<div class="choice-content">'+
							//embed-source-lookup-field
							'<select class="form-select embed-source-lookup-field" data-type="'+data_type+'" ></select>'+
							
							
						'</div>'+
					'</div>'+
			    '</div>'+
			'</div>';
		ret
		+=	'<div class="' + obj_float3 + ' properties_width_container embedProperty">'+
			    '<div class="fields_below">'+
					'<div class="label_below2">Search Field: <font color="red"></font></div>'+
					'<div class="input_position_below embed_result_field">'+
						'<label><input type="radio" value="static" checked="true" name="embed_rfc_choice" class=""/>Static</label>'+ //DITO NA KO
						'<label> <input type="radio" value="computed" name="embed_rfc_choice" class=""/>Computed</label>'+
						'<div class="embed-result-field-c" style="margin-top:7px;">'+
							'<select class="form-select embed-result-field" data-type="'+data_type+'" ></select>'+
						'</div>'+
						'<div style="display:none; margin-top:2px;" class="embed-result-field-computed-c">'+
							'<textarea  class="form-textarea embed-result-field-formula" data-type="'+data_type+'"></textarea>'+
						'</div>'+
				    	
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
    }
    function obj_inputValidation(obj_float,data_type){
    	var ret
    	=	'<div class="' + obj_float + ' properties_width_container">'+
			    '<div class="fields_below">'+
					'<div class="label_below2">Input validation formula: <font color="red"></font></div>'+
					'<div class="input_position_below obj_inputValidation">'+
				    	'<textarea class="form-textarea field-formula-validation" data-type="'+data_type+'" style="resize:vertical;"></textarea>'+
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
    }
    function obj_inputValidationMessage(obj_float,data_type){
    	var ret
    	=	'<div class="' + obj_float + ' properties_width_container">'+
			    '<div class="fields_below">'+
					'<div class="label_below2">Input validation message: <font color="red"></font></div>'+
					'<div class="input_position_below obj_inputValidationMessage">'+
				    	'<textarea class="form-textarea field-formula-validation-message" data-type="'+data_type+'" style="resize:vertical;"></textarea>'+
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
    }
    function obj_defaultValueChoices(obj_float,data_type){
		var ret
    	=	'<div class="' + obj_float + ' properties_width_container multiple_field_value">'+
			    '<div class="fields_below">'+
					'<div class="label_below2">Default value: <font color="red"></font></div>'+
					'<div data-type="'+data_type+'" class="input_position_below obj_defaultValueChoices">'+
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
	}
	function obj_defaultValue(obj_float,data_type){
		var ret
    	=	'<div class="' + obj_float + ' properties_width_container">'+
			    '<div class="fields_below">'+
					'<div class="label_below2">Default value: <font color="red"></font><span class="formula-help" help-type="DefaultComputed"><span class="icon-question-circle"></span></span></div>'+
					'<div class="input_position_below">'+
				    	'<label><input data-properties-type="defaultValueType" class="css-checkbox" value="static" type="radio" checked="checked" name="default_val" id="Static" /><label for="Static" class="css-label"></label>Static </label>'+
				    	'<label><input data-properties-type="defaultValueType" class="css-checkbox" value="computed" type="radio"  name="default_val" id="Computed"/><label for="Computed" class="css-label"></label>Computed </label>'+
				    	'<label><input data-properties-type="defaultValueType" class="css-checkbox" value="middleware" type="radio"  name="default_val" id="Middleware"/><label for="Middleware" class="css-label"></label>Middleware </label>'+
				    	'<textarea data-type="' + data_type + '" class="form-textarea obj_prop fl-remove-margin-top" id="" data-properties-type="defaultValue" data-object-id="" style="resize:vertical;"></textarea>'+
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
	}
	function obj_middleWareChoice(obj_float,data_type){
		var ret
    	=	'<div class="' + obj_float + ' properties_width_container middlewareTaggingContainer" style="display:none;">'+
			    '<div class="fields_below">'+
					'<div class="label_below2">Middleware Formula Execution Tag: <font color="red"></font><span class="formula-help" help-type="DefaultComputed"><span class="icon-question-circle"></span></span></div>'+
					'<div class="input_position_below">'+
				    	'<textarea data-type="'+ data_type +'" class="form-textarea obj_prop" data-properties-type="middlewareTagging">'+
				    	'</textarea>'+
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
	}
    function obj_tabIndex(obj_float,data_type){
    	var ret
    	=	'<div class="' + obj_float + ' properties_width_container">'+
			    '<div class="fields_below">'+
					'<div class="label_below2">Field Tab Index: <font color="red"></font></div>'+
					'<div class="input_position_below">'+
				    	'<input type="number" min="1" name="" data-type="' + data_type + '" class="form-text obj_prop" id="" data-properties-type="tabIndex" data-object-id="" placeholder="Tabindex">'+
					'</div>'+
			    '</div>'+
			'</div>';
		return ret;
    }
    function obj_lblName(obj_float,data_type) {
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Label Name: <font color="red"></font></div>';
		ret += '<div class="input_position_below">';
		    ret += '<input type="text" maxlength="64" name="" data-type="' + data_type + '" class="form-text obj_prop" id="" data-properties-type="lblName" data-object-id="" placeholder="Label Name">';
		ret += '</div>';
	    ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    
    function obj_lblInputName(obj_float,data_type) {
		var ret = "";
		ret += '<div class="' + obj_float + ' properties_width_container">';
		    ret += '<div class="fields_below">';
			ret += '<div class="label_below2">Field Name: <font color="red"></font></div>';
			ret += '<div class="input_position_below">';
			    ret += '<input type="text" maxlength="64" name="" data-type="' + data_type + '" class="form-text obj_prop fl-lblFldName" id="" data-properties-type="lblFldName" data-object-id="" placeholder="Field Name">';
			ret += '</div>';
		    ret += '</div>';
		ret += '</div>';
	    return ret;
    }
    
    function obj_PlaceHolder(obj_float,data_type) {
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Text Placeholder: <font color="red"></font></div>';
		ret += '<div class="input_position_below">';
		    ret += '<input type="text" name="" data-type="' + data_type + '" class="form-text obj_prop" id="" data-properties-type="lblPlaceHolder" data-object-id="" placeholder="Text Placeholder">';
		ret += '</div>';
	    ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    
    function obj_Tooltip(obj_float,data_type) {
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Tooltip (Help): <font color="red"></font></div>';
		ret += '<div class="input_position_below">';
		    ret += '<input type="text" name="" data-type="' + data_type + '" class="form-text obj_prop" id="" data-properties-type="lblTooltip" data-object-id="" placeholder="Tooltip">';
		ret += '</div>';
	    ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    
    function obj_lblFontWeight(obj_float,data_type) {
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Label Font Weight: <font color="red"></font></div>';
		ret += '<div class="input_position_below">';
		    ret += '<select data-type="' + data_type + '" class="form-select obj_prop" data-object-id="" id="" data-properties-type="lblFontWg">';
			ret += '<option value="">------Select------</option>';
			ret += '<option value="normal">Normal</option>';
			ret += '<option value="bold">Bold</option>';
		    ret += '</select>';
		ret += '</div>';
	    ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    
    function obj_lblFontSize(obj_float,data_type) {
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Label Font Size: <font color="red"></font></div>';
		ret += '<div class="input_position_below">';
		    ret += '<select data-type="' + data_type + '" class="form-select obj_prop" data-object-id="" id="" data-properties-type="lblFontSize">';
		    ret += '<option>------Select------</option>';
		    ret += '<option value="6px">6px</option>';
		    ret += '<option value="8px">8px</option>';
		    ret += '<option value="9px">9px</option>';
		    ret += '<option value="10px">10px</option>';
		    ret += '<option value="11px">11px</option>';
		    ret += '<option value="12px">12px</option>';
		    ret += '<option value="14px">14px</option>';
		    ret += '<option value="18px">18px</option>';
		    ret += '<option value="24px">24px</option>';
		    ret += '<option value="30px">30px</option>';
		    ret += '<option value="36px">36px</option>';
		    ret += '<option value="48px">48px</option>';
		    ret += '<option value="60px">60px</option>';
		    ret += '<option value="72px">72px</option>';
		    ret += '</select>';
		ret += '</div>';
	    ret += '</div>';
	ret += '</div>';
	    return ret;
    }
	
    function obj_lblAllow(obj_float,data_type) {
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Allow Label:</div>';
		ret += '<div class="input_position_below">';
		    ret += '<select data-type="' + data_type + '" name="" class="form-select obj_prop" id="" data-properties-type="lblAllowLabel" data-object-id="">';
			ret += '<option value="Yes">Yes</option>';
			ret += '<option value="No">No</option>';
		    ret += '</select>';
		ret += '</div>';
	    ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    
    function obj_addChoices(obj_float,data_type) {
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">List:</div>';
		ret += '<div class="input_position_below">';
		    ret += '<textarea name="" data-type="' + data_type + '" class="form-textarea obj_prop" id="" data-properties-type="lblChoices" data-object-id="" style="height:90px;">';
		    ret += '</textarea>';
		ret += '</div>';
	    ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    
    function obj_fldMaxLength(obj_float,data_type) {
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Field Max Length: <font color="red"></font></div>';
		ret += '<div class="input_position_below">';
		    ret += '<input type="text" name="" data-type="' + data_type + '" class="form-text obj_prop prop_numeric_val" id="" data-properties-type="lblMaxLength" data-object-id="" placeholder="Max Length">';
		ret += '</div>';
	    ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    
    function obj_fldHeight(obj_float,data_type) {
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Field Height:</div>';
		ret += '<div class="input_position_below">';
		    ret += '<input type="text" data-type="' + data_type + '" class="form-text obj_prop prop_numeric_val" id="" data-properties-type="lblFieldHeight" data-object-id="" placeholder="Field Height"/>';
		ret += '</div>';
		ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    function obj_fldMinHeight(obj_float,data_type) {//BAGO
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Field Min Height:</div>';
		ret += '<div class="input_position_below">';
		    ret += '<input type="text" data-type="' + data_type + '" class="form-text obj_prop prop_numeric_val" id="" data-properties-type="lblFieldMinHeight" data-object-id="" placeholder="Field Min Height"/>';
		ret += '</div>';
		ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    function obj_fldMaxHeight(obj_float,data_type) {//BAGO
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Field Max Height:</div>';
		ret += '<div class="input_position_below">';
		    ret += '<input type="text" data-type="' + data_type + '" class="form-text obj_prop prop_numeric_val" id="" data-properties-type="lblFieldMaxHeight" data-object-id="" placeholder="Field Max Height"/>';
		ret += '</div>';
		ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    function obj_fldWidth(obj_float,data_type) {
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Field Width:</div>';
		ret += '<div class="input_position_below">';
		    ret += '<input type="text" data-type="' + data_type + '" class="form-text obj_prop prop_numeric_val" id="" data-properties-type="lblFieldWidth" data-object-id="" placeholder="Field Width"/>';
		ret += '</div>';
		ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    function obj_fldMinWidth(obj_float,data_type) {//BAGO
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Field Min Width:</div>';
		ret += '<div class="input_position_below">';
		    ret += '<input type="text" data-type="' + data_type + '" class="form-text obj_prop prop_numeric_val" id="" data-properties-type="lblFieldMinWidth" data-object-id="" placeholder="Field Min Width"/>';
		ret += '</div>';
		ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    function obj_fldMaxWidth(obj_float,data_type) {//BAGO
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Field Max Width:</div>';
		ret += '<div class="input_position_below">';
		    ret += '<input type="text" data-type="' + data_type + '" class="form-text obj_prop prop_numeric_val" id="" data-properties-type="lblFieldMaxWidth" data-object-id="" placeholder="Field Max Width"/>';
		ret += '</div>';
		ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    function obj_fldType(obj_float,data_type) {
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Field Type:</div>';
		ret += '<div class="input_position_below">';
		    ret += '<select name="" data-type="' + data_type + '" class="form-select obj_prop" id="" data-properties-type="lblFieldType" data-object-id="">';
			ret += '<option data-input-type="Text" value="longtext">Text</option>';
			ret += '<option data-input-type="Currency" value="double">Currency</option>';
			ret += '<option data-input-type="Number" value="double">Number</option>';
		    ret += '</select>';
		ret += '</div>';
		ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    
    function obj_allowDuplicate(obj_float,data_type) {
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Allow Duplicate:</div>';
		ret += '<div class="input_position_below">';
		    ret += '<input type="button" name="" data-type="' + data_type + '" class="btn-basicBtn obj_prop" id="" data-properties-type="lblAllowDuplicate" data-object-id="" value="Yes">';
		ret += '</div>';
	    ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    
    function obj_lblFontColor(obj_float,data_type) {
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Label Font Color:</div>';
		ret += '<div class="input_position_below">';
		    ret += '<input type="text" data-type="' + data_type + '" class="chngColor" data-properties-type="lblFontolor" data-type="label"/>';
		ret += '</div>';
		ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    
    function obj_fldColor(obj_float,data_type) {
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Border Field Color:</div>';
		ret += '<div class="input_position_below">';
		    ret += '<input type="text" data-type="' + data_type + '" class="chngColor" data-properties-type="lblFieldColor" data-type="button"/>';
		ret += '</div>';
		ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    
    function obj_lblAlignment(obj_float,data_type) {
	var ret = "";
	ret += '<div class="' + obj_float + ' properties_width_container">';
	    ret += '<div class="fields_below">';
		ret += '<div class="label_below2">Label Alignment:</div>';
		ret += '<div class="input_position_below">';
		    ret += '<select name="" data-type="' + data_type + '" class="form-select obj_prop" id="" data-properties-type="lblAlignment" data-object-id="">';
			ret += '<option value="alignTop">Align Top</option>';
			ret += '<option value="alignLeft">Align Left</option>';
		    ret += '</select>';
		ret += '</div>';
		ret += '</div>';
	ret += '</div>';
	    return ret;
    }
    function processorType_fb(obj_float,data_type) {
		var ret = "";
		ret += '<div class="' + obj_float + ' properties_width_container">';
		    ret += '<div class="fields_below">';
			ret += '<div class="label_below2">Processor Type:</div>';
			ret += '<div class="input_position_below">';
			ret += '<select class="form-select workflow-processor-type obj_prop" id="" style="margin-top:0px">'
			ret +=   '<option value="0">--Select--</option>'
			ret +=   '<option value="1">Department Position</option>'
			ret +=   '<option value="2">Company Position</option>'
			ret +=   '<option value="3">Employee</option>'
			ret +=   '<option value="4">Requestor</option>'
			// ret +=   '<option value="5">Field</option>'
			ret +=  '</select>'
			ret += '</div>';
			ret += '</div>';
		ret += '</div>';
		return ret;
    } 
    function processor_fb(obj_float,data_type) {
		var ret = "";
		ret += '<div class="' + obj_float + ' properties_width_container">';
		    ret += '<div class="fields_below">';
				ret += '<div class="label_below2">Processor:</div>';
				ret += '<div class="input_position_below">';
					ret += '<select class="form-select workflow-processor obj_prop" id="" style="margin-top:0px">';
		            ret += '<option value="0">--Select--</option>';
		            ret += '</select>';
		            ret += '<img src="/images/loader/loading.gif" class="pull-left display processorLoad"/>';
				ret += '</div>';
			ret += '</div>';
		ret += '</div>';
		return ret;
    }

function setFieldProperties(){
	var object_id = if_undefinded($(".workflow-processor").attr("data-object-id"),"");
	var json = $("body").data();
	console.log("dasdsadsadasas",json)
	if(object_id){
		var ptype = $(".workflow-processor-type").val();
		var proc = $(".workflow-processor").val();
		
		if(json[''+ object_id +'']){
			json[''+ object_id +'']['processor-type'] = ptype;
			json[''+ object_id +'']['processor'] = proc;
			$("#getFields_"+object_id).attr("processor-type",ptype);
			$("#getFields_"+object_id).attr("processor",proc);

		}
	}

	var OID = $("#popup_container").attr("data-object-id");
	
	{//saving property of image picklist
		// if ($('body').data(OID)) {//kapag existing na ung prop data
		// 	var body_data_val_iod = $('body').data(OID);
		// 	body_data_val_iod['imagePrev'] = $(".imagePrev").attr("src");
		// 	$('body').data(OID, body_data_val_iod );
		// 	var img = '<img data-placement="bottom" data-type="pickList" data-original-title="" src="' + $(".imagePrev").attr("src") + '" width="10" height="10" class="avatar userAvatar imagePrev" style="float: left;margin-top: -21px;margin-left: 5px;cursor: pointer;">';
		// 	$('a[return-field="getFields_' + OID + '"]').html(img);
			
		// }else{ //pag di pa existing ung prop data
		// 	$('body').data(OID, {'imagePrev':$(".imagePrev").attr("src")} );
		// 	var img = '<i class="icon-list-alt fa fa-list-alt"></i>';
		// 	$('a[return-field="getFields_' + OID + '"]').html(img);
		// 	alert("adsdsa")
		// }
	}
	
	if(typeof json[''+OID] != "undefined"){
		if($(".design-embed-highlights-prop").length >= 1 ){
			json[''+ OID +'']['embed-hl-data'] = [];
			$(".design-embed-highlights-prop").find("tr").each(function(eqi){
				if($(this).hasClass('HL_RULE_PROP1')){
					var hl_rule_prop1 = $(this);
					var hl_rule_prop2 = $(this).next();
					json[''+ OID +'']['embed-hl-data'].push({
						"hl_color":""+hl_rule_prop1.find(".sp-preview-inner").css("background-color"),
						"hl_fn":""+hl_rule_prop1.find(".hl-fn").val(),
						"condition_type":""+hl_rule_prop2.find(".choose-condition-type").val(),
						"hl_value":""+hl_rule_prop2.find(".hl-value").val(),
						"hl_value2":""+hl_rule_prop2.find(".hl-value2").val(),
						"value_type":hl_rule_prop2.find(".value-type-HL:checked").val()
					});
				}else{
					return true;
				}
			})
			json[''+ OID +'']['embed-hl-data'] = JSON.stringify(json[''+ OID +'']['embed-hl-data']);
			$("#setObject_"+OID).find(".getFields_"+OID).attr("embed-hl-data",json[''+ OID +'']['embed-hl-data']);
		}

		if($(".embed-display-column").length >= 1 ){
			json[''+ OID +'']['embed-column-data'] = [];
			$(".embed-display-column").find("option:selected").each(function(eqi){
				json[''+ OID +'']['embed-column-data'].push($(this).val());
			})
			json[''+ OID +'']['embed-column-data'] = JSON.stringify(json[''+ OID +'']['embed-column-data']);
			$("#setObject_"+OID).find(".getFields_"+OID).attr("embed-column-data",json[''+ OID +'']['embed-column-data']);
		}





	}else{
		json[''+ OID +''] = {};
		
		if($(".design-embed-highlights-prop").length >= 1 ){
			json[''+ OID +'']['embed-hl-data'] = [];
			$(".design-embed-highlights-prop").find("tr").each(function(eqi){
				if($(this).hasClass('HL_RULE_PROP1')){
					var hl_rule_prop1 = $(this);
					var hl_rule_prop2 = $(this).next();
					json[''+ OID +'']['embed-hl-data'].push({
						"hl_color":""+hl_rule_prop1.find(".sp-preview-inner").css("background-color"),
						"hl_fn":""+hl_rule_prop1.find(".hl-fn").val(),
						"condition_type":""+hl_rule_prop2.find(".choose-condition-type").val(),
						"hl_value":""+hl_rule_prop2.find(".hl-value").val(),
						"hl_value2":""+hl_rule_prop2.find(".hl-value2").val(),
						"value_type":hl_rule_prop2.find(".value-type-HL:checked").val()
					});
				}else{
					return true;
				}
			})
			json[''+ OID +'']['embed-hl-data'] = JSON.stringify(json[''+ OID +'']['embed-hl-data']);
			$("#setObject_"+OID).find(".getFields_"+OID).attr("embed-hl-data",json[''+ OID +'']['embed-hl-data']);
		}


		if($(".embed-display-column").length >= 1 ){
			json[''+ OID +'']['embed-column-data'] = [];
			$(".embed-display-column").find("option:selected").each(function(eqi){
				json[''+ OID +'']['embed-column-data'].push($(this).val());
			})
			json[''+ OID +'']['embed-column-data'] = JSON.stringify(json[''+ OID +'']['embed-column-data']);
			$("#setObject_"+OID).find(".getFields_"+OID).attr("embed-column-data",json[''+ OID +'']['embed-column-data']);
		}
	}


	if($('[data-properties-type="defaultValue"]').length >= 1 ){
		var radio_check = $('[data-properties-type="defaultValueType"]:checked').val();
		if(radio_check == "computed"){
			$(".getFields_"+OID).attr("default-formula-value",$('[data-properties-type="defaultValue"]').val());
			$(".getFields_"+OID).attr("default-type", "computed");
		}else if(radio_check == "middleware"){
			$(".getFields_"+OID).attr("default-middleware-value",$('[data-properties-type="defaultValue"]').val());
			$(".getFields_"+OID).attr("default-type", "middleware");
			var middlewareTag = $('[data-properties-type="middlewareTagging"]').val();
			$(".getFields_"+OID).attr("middlewareTagging", middlewareTag);
		}else {
			$(".getFields_"+OID).attr("default-static-value",$('[data-properties-type="defaultValue"]').val());
			$(".getFields_"+OID).attr("default-type", "static");
		}
		
		if(typeof json[''+OID] != "undefined"){
			json[''+OID]["defaultValue"] = $('[data-properties-type="defaultValue"]').val();
			json['' + OID + '']["defaultValueType"] = radio_check;
		}else{
			json[''+OID] = {};
			json[''+OID]["defaultValue"] = $('[data-properties-type="defaultValue"]').val();
			json['' + OID + '']["defaultValueType"] = radio_check;
		}
	}

	if($('.encryptDataProperty').length >= 1 ){
		var encrypt_type_ele_field = $('[data-properties-type="ecryptDataPropField"]');
		$(".getFields_"+OID).attr("encryption-type",encrypt_type_ele_field.val());
	}

	if($('.numberToWords').length >= 1 ){
		var num_to_words_ele_field = $('[data-properties-type="numberToWordsPropField"]');
		$(".getFields_"+OID).attr("num-to-words",num_to_words_ele_field.val());
	}

	//CLEAR PROPERTY UI'S
	if($(".mentionSearchChoice").length >= 1){
		$(".mentionSearchChoice").html("");
	}

	console.log($("body").data());
	if($(".fl-closeDialog").length >= 1){
		$(".fl-closeDialog").trigger("click");
	}else{
		$("#popup_cancel").trigger("click");
	}
}